<template>
  <div class="mini-container">
    <div v-if="name" class="title">
      <span>{{ name }}</span>
    </div>
    <div class="container">
      <slot name="content" />
    </div>
  </div>
</template>

<script>
export default {
  props: {
    name: {
      type: String,
      default: "",
    },
    needcontainer: {
      type: Boolean,
      default: true,
      require: false,
    },
  },
  data() {
    return {};
  },
  methods: {},
};
</script>

<style lang="scss" scoped>
.mini-container {
  width: auto;
  height: 100%;
  // padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  .title {
    margin-left: 5px;
    width: 32px;
    // height: 100%;
    text-align: center;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2; /* 限制最多两行 */
    overflow: hidden;
    word-wrap: break-word; /* 允许长单词换行 */
    span {
      font-size: 14px;
      font-weight: bold;
    }
  }
  .container {
    width: auto;
    height: 100%;
  }
}
</style>
